{{:ModuleInclude('public/header')}}

<!-- right content start  -->
<div class="content-right">
    <!-- second nav end -->
	<div class="content">
        <!-- form start -->
        <form class="am-form form-validation am-form-popup-sticky" action="{{:MyUrl('admin/site/save')}}" method="POST" request-type="ajax-view" request-value="{{:MyUrl('admin/site/index')}}" enctype="multipart/form-data">
            {{if !isset($is_theme_data_admin) or $is_theme_data_admin eq 0}}
                {{:ModuleInclude('public/nav_switch_btn', [
                    'nav_data' => [
                        [
                            'name' => MyLang('base_config_title'),
                            'key'  => 'site-base',
                        ],
                        [
                            'name' => MyLang('site.base_item_site_status_title'),
                            'key'  => 'site-status',
                        ],
                        [
                            'name' => MyLang('site.base_item_site_domain_title'),
                            'key'  => 'site-domain',
                        ],
                        [
                            'name' => MyLang('site.base_item_site_filing_title'),
                            'key'  => 'site-filing',
                        ],
                        [
                            'name' => MyLang('site.base_item_site_other_title'),
                            'key'  => 'site-other',
                        ]
                    ]
                ])}}
            {{/if}}
            <div class="nav-content">
                <!-- 基础配置 -->
                <div class="item {{if empty($params['switch']) or $params['switch'] eq 'site-base'}}am-active{{/if}}" data-key="site-base">
                    <div class="am-form-group">
                        <label>{{$data.home_site_name.name}}</label>
                        <input type="text" name="{{$data.home_site_name.only_tag}}" minlength="1" placeholder="{{$data.home_site_name.name}}" data-validation-message="{{$data.home_site_name.error_tips}}" class="am-radius" {{if !empty($data)}}value="{{$data.home_site_name.value}}"{{/if}} required />
                    </div>
                    <div class="am-form-group">
                        <label class="am-block">{{$data.home_site_logo.name}}<span class="am-form-group-label-tips">{{$data.home_site_logo.describe}}</span></label>
                        <div class="am-form-file-upload-container plug-file-upload-view-width-auto">
                            <ul class="plug-file-upload-view home_site_logo-images-view" data-form-name="home_site_logo" data-max-number="1" data-dialog-type="images" data-is-eye="1">
                                <li class="plug-file-upload-submit" data-view-tag="ul.home_site_logo-images-view">
                                    {{if empty($data['home_site_logo']['value'])}}
                                        <i class="iconfont icon-upload-add"></i>
                                    {{else /}}
                                        <input type="text" name="home_site_logo" value="{{$data.home_site_logo.value}}" />
                                        <img src="{{:AttachmentPathViewHandle($data.home_site_logo.value)}}" />
                                        <i class="iconfont icon-close"></i>
                                        <i class="iconfont icon-eye"></i>
                                    {{/if}}
                                </li>
                            </ul>
                        </div>
                    </div>

                    <div class="am-form-group">
                        <label class="am-block">{{$data.home_site_logo_wap.name}}<span class="am-form-group-label-tips">{{$data.home_site_logo_wap.describe}}</span></label>
                        <div class="am-form-file-upload-container plug-file-upload-view-width-auto">
                            <ul class="plug-file-upload-view home_site_logo_wap-images-view" data-form-name="home_site_logo_wap" data-max-number="1" data-dialog-type="images" data-is-eye="1">
                                <li class="plug-file-upload-submit" data-view-tag="ul.home_site_logo_wap-images-view">
                                    {{if empty($data['home_site_logo_wap']['value'])}}
                                        <i class="iconfont icon-upload-add"></i>
                                    {{else /}}
                                        <input type="text" name="home_site_logo_wap" value="{{$data.home_site_logo_wap.value}}" />
                                        <img src="{{:AttachmentPathViewHandle($data.home_site_logo_wap.value)}}" />
                                        <i class="iconfont icon-close"></i>
                                        <i class="iconfont icon-eye"></i>
                                    {{/if}}
                                </li>
                            </ul>
                        </div>
                    </div>

                    <div class="am-form-group">
                        <label class="am-block">{{$data.home_site_logo_app.name}}<span class="am-form-group-label-tips">{{$data.home_site_logo_app.describe}}</span></label>
                        <div class="am-form-file-upload-container plug-file-upload-view-width-auto">
                            <ul class="plug-file-upload-view home_site_logo_app-images-view" data-form-name="home_site_logo_app" data-max-number="1" data-dialog-type="images" data-is-eye="1">
                                <li class="plug-file-upload-submit" data-view-tag="ul.home_site_logo_app-images-view">
                                    {{if empty($data['home_site_logo_app']['value'])}}
                                        <i class="iconfont icon-upload-add"></i>
                                    {{else /}}
                                        <input type="text" name="home_site_logo_app" value="{{$data.home_site_logo_app.value}}" />
                                        <img src="{{:AttachmentPathViewHandle($data.home_site_logo_app.value)}}" />
                                        <i class="iconfont icon-close"></i>
                                        <i class="iconfont icon-eye"></i>
                                    {{/if}}
                                </li>
                            </ul>
                        </div>
                    </div>

                    <div class="am-form-group">
                        <label class="am-block">{{$data.home_site_logo_square.name}}<span class="am-form-group-label-tips">{{$data.home_site_logo_square.describe}}</span></label>
                        <div class="am-form-file-upload-container">
                            <ul class="plug-file-upload-view home_site_logo_square-images-view" data-form-name="home_site_logo_square" data-max-number="1" data-dialog-type="images" data-is-eye="1">
                                <li class="plug-file-upload-submit" data-view-tag="ul.home_site_logo_square-images-view">
                                    {{if empty($data['home_site_logo_square']['value'])}}
                                        <i class="iconfont icon-upload-add"></i>
                                    {{else /}}
                                        <input type="text" name="home_site_logo_square" value="{{$data.home_site_logo_square.value}}" />
                                        <img src="{{:AttachmentPathViewHandle($data.home_site_logo_square.value)}}" />
                                        <i class="iconfont icon-close"></i>
                                        <i class="iconfont icon-eye"></i>
                                    {{/if}}
                                </li>
                            </ul>
                        </div>
                    </div>

                    <div class="am-form-group">
                        <label>{{$data.common_timezone.name}}<span class="am-form-group-label-tips">{{$data.common_timezone.describe}}</span></label>
                        <select name="{{$data.common_timezone.only_tag}}" class="am-radius chosen-select" data-placeholder="{{$data.common_timezone.name}}" data-validation-message="{{$data.common_timezone.error_tips}}" required>
                            {{foreach $common_site_timezone_list as $k=>$v}}
                                <option value="{{$k}}" {{if isset($data['common_timezone']['value']) and $data['common_timezone']['value'] eq $k}}selected{{/if}}>{{$v}}</option>
                            {{/foreach}}
                        </select>
                    </div>
                </div>

                <!-- 站点状态 -->
                <div class="item {{if !empty($params['switch']) and $params['switch'] eq 'site-status'}}am-active{{/if}}" data-key="site-status">
                    <div class="am-form-group">
                        <label class="am-block">{{$data.home_site_app_state.name}}<span class="am-form-group-label-tips">{{$data.home_site_app_state.describe}}</span></label>
                        <div class="am-checkbox-group am-flex am-gap-12">
                            {{foreach :MyConst('common_platform_type') as $v}}
                                {{if !in_array($v['value'], ['pc'])}}
                                    <label class="am-checkbox-inline">
                                        <input type="checkbox" name="{{$data.home_site_app_state.only_tag}}" value="{{$v.value}}" {{if !empty($data['home_site_app_state']) and !empty($data['home_site_app_state']['value']) and is_array($data['home_site_app_state']['value']) and in_array($v['value'], $data['home_site_app_state']['value'])}}checked{{/if}} data-validation-message="{{$data.home_site_app_state.error_tips}}" data-am-ucheck /> {{$v.name}}
                                    </label>
                                {{/if}}
                            {{/foreach}}
                        </div>
                    </div>
                    <div class="am-form-group">
                        <label>{{$data.home_site_web_state.name}}<span class="am-form-group-label-tips">{{$data.home_site_web_state.describe}}</span></label>
                        <div class="am-radio-group">
                            {{foreach $common_close_open_list as $v}}
                                <label class="am-radio-inline">
                                    <input type="radio" value="{{$v.value}}" name="{{$data.home_site_web_state.only_tag}}" data-validation-message="{{$data.home_site_web_state.error_tips}}" required {{if isset($data['home_site_web_state']['value']) and $data['home_site_web_state']['value'] eq $v['value']}}checked{{/if}} data-am-ucheck>{{$v.name}}
                                </label>
                            {{/foreach}}
                        </div>
                    </div>
                    <div class="am-form-group">
                        <label>{{$data.home_site_web_home_state.name}}<span class="am-form-group-label-tips">{{$data.home_site_web_home_state.describe}}</span></label>
                        <div class="am-radio-group">
                            {{foreach $common_close_open_list as $v}}
                                <label class="am-radio-inline">
                                    <input type="radio" value="{{$v.value}}" name="{{$data.home_site_web_home_state.only_tag}}" data-validation-message="{{$data.home_site_web_home_state.error_tips}}" required  {{if isset($data['home_site_web_home_state']['value']) and $data['home_site_web_home_state']['value'] eq $v['value']}}checked{{/if}} data-am-ucheck>{{$v.name}}
                                </label>
                            {{/foreach}}
                        </div>
                    </div>
                    <div class="am-form-group">
                        <label>{{$data.home_site_web_pc_state.name}}<span class="am-form-group-label-tips">{{$data.home_site_web_pc_state.describe}}</span></label>
                        <div class="am-radio-group">
                            {{foreach $common_close_open_list as $v}}
                                <label class="am-radio-inline">
                                    <input type="radio" value="{{$v.value}}" name="{{$data.home_site_web_pc_state.only_tag}}" data-validation-message="{{$data.home_site_web_pc_state.error_tips}}" required {{if isset($data['home_site_web_pc_state']['value']) and $data['home_site_web_pc_state']['value'] eq $v['value']}}checked{{/if}} data-am-ucheck>{{$v.name}}
                                </label>
                            {{/foreach}}
                        </div>
                    </div>
                    <div class="am-form-group">
                        <label>{{$data.home_site_close_reason.name}}<span class="am-form-group-label-tips">{{$data.home_site_close_reason.describe}}</span></label>
                        <textarea rows="4" name="{{$data.home_site_close_reason.only_tag}}" class="am-radius" placeholder="{{$data.home_site_close_reason.name}}" data-validation-message="{{$data.home_site_close_reason.error_tips}}">{{if !empty($data)}}{{$data.home_site_close_reason.value}}{{/if}}</textarea>
                    </div>
                </div>

                <!-- 站点域名地址 -->
                <div class="item {{if !empty($params['switch']) and $params['switch'] eq 'site-domain'}}am-active{{/if}}" data-key="site-domain">
                    {{if is_array(MyLang('site.site_domain_tips_list'))}}
                        <div class="am-operate-stretch-tips">
                            <div class="title">
                                <i class="iconfont icon-tips"></i>
                                <strong title="{{:MyLang('operate_list_tips_msg')}}">{{:MyLang('operate_list_tips_button_text')}}</strong>
                                <i class="iconfont icon-contract contract" title="{{:MyLang('operate_list_tips_retract_text')}}"></i> 
                            </div>
                            <p>{{:implode('</p><p>', MyLang('site.site_domain_tips_list'))}}</p>
                        </div>
                    {{/if}}
                    <div class="am-form-group">
                        <label>{{$data.common_domain_host.name}}<span class="am-form-group-label-tips">{{$data.common_domain_host.describe}}</span></label>
                        <input type="url" name="{{$data.common_domain_host.only_tag}}" placeholder="{{$data.common_domain_host.describe}}" data-validation-message="{{$data.common_domain_host.error_tips}}" class="am-radius" {{if !empty($data)}}value="{{$data.common_domain_host.value}}"{{/if}} />
                    </div>
                    <div class="am-form-group">
                        <label>{{$data.common_cdn_attachment_host.name}}<span class="am-form-group-label-tips">{{$data.common_cdn_attachment_host.describe}}</span></label>
                        <input type="url" name="{{$data.common_cdn_attachment_host.only_tag}}" placeholder="{{$data.common_cdn_attachment_host.describe}}" data-validation-message="{{$data.common_cdn_attachment_host.error_tips}}" class="am-radius" {{if !empty($data)}}value="{{$data.common_cdn_attachment_host.value}}"{{/if}} />
                    </div>
                    <div class="am-form-group">
                        <label>{{$data.common_cdn_public_host.name}}<span class="am-form-group-label-tips">{{$data.common_cdn_public_host.describe}}</span></label>
                        <input type="url" name="{{$data.common_cdn_public_host.only_tag}}" placeholder="{{$data.common_cdn_public_host.describe}}" data-validation-message="{{$data.common_cdn_public_host.error_tips}}" class="am-radius" {{if !empty($data)}}value="{{$data.common_cdn_public_host.value}}"{{/if}} />
                    </div>
                </div>

                <!-- 备案信息 -->
                <div class="item {{if !empty($params['switch']) and $params['switch'] eq 'site-filing'}}am-active{{/if}}" data-key="site-filing">
                    <div class="am-form-group">
                        <label>{{$data.home_site_icp.name}}<span class="am-form-group-label-tips">{{$data.home_site_icp.describe}}</span></label>
                        <input type="text" name="{{$data.home_site_icp.only_tag}}" placeholder="{{$data.home_site_icp.describe}}" data-validation-message="{{$data.home_site_icp.error_tips}}" class="am-radius" {{if !empty($data)}}value="{{$data.home_site_icp.value}}"{{/if}} />
                    </div>

                    <div class="am-form-group">
                        <label>{{$data.home_site_security_record_name.name}}<span class="am-form-group-label-tips">{{$data.home_site_security_record_name.describe}}</span></label>
                        <input type="text" name="{{$data.home_site_security_record_name.only_tag}}" placeholder="{{$data.home_site_security_record_name.describe}}" data-validation-message="{{$data.home_site_security_record_name.error_tips}}" class="am-radius" {{if !empty($data)}}value="{{$data.home_site_security_record_name.value}}"{{/if}} />
                    </div>
                    <div class="am-form-group">
                        <label>{{$data.home_site_security_record_url.name}}<span class="am-form-group-label-tips">{{$data.home_site_security_record_url.describe}}</span></label>
                        <input type="text" name="{{$data.home_site_security_record_url.only_tag}}" placeholder="{{$data.home_site_security_record_url.describe}}" data-validation-message="{{$data.home_site_security_record_url.error_tips}}" class="am-radius" {{if !empty($data)}}value="{{$data.home_site_security_record_url.value}}"{{/if}} />
                    </div>

                    <div class="am-form-group">
                        <label>{{$data.home_site_telecom_license.name}}<span class="am-form-group-label-tips">{{$data.home_site_telecom_license.describe}}</span></label>
                        <input type="text" name="{{$data.home_site_telecom_license.only_tag}}" placeholder="{{$data.home_site_telecom_license.describe}}" data-validation-message="{{$data.home_site_telecom_license.error_tips}}" class="am-radius" {{if !empty($data)}}value="{{$data.home_site_telecom_license.value}}"{{/if}} />
                    </div>

                    <div class="am-form-group">
                        <label>{{$data.home_site_company_license.name}}</label>
                        <input type="text" name="{{$data.home_site_company_license.only_tag}}" placeholder="{{$data.home_site_company_license.describe}}" data-validation-message="{{$data.home_site_company_license.error_tips}}" class="am-radius" {{if !empty($data)}}value="{{$data.home_site_company_license.value}}"{{/if}} />
                        <div class="am-tips-card">
                            <p>{{$data.home_site_company_license.describe}}</p>
                        </div>
                    </div>
                </div>

                <!-- 其它 -->
                <div class="item {{if !empty($params['switch']) and $params['switch'] eq 'site-other'}}am-active{{/if}}" data-key="site-other">
                    <div class="am-form-group">
                        <label>{{$data.home_static_cache_version.name}}<span class="am-form-group-label-tips">{{$data.home_static_cache_version.describe}}</span></label>
                        <input type="text" name="{{$data.home_static_cache_version.only_tag}}" placeholder="{{$data.home_static_cache_version.describe}}" data-validation-message="{{$data.home_static_cache_version.error_tips}}" class="am-radius" {{if !empty($data)}}value="{{$data.home_static_cache_version.value}}"{{/if}} />
                    </div>
                    <div class="am-form-group">
                        <label>{{$data.home_footer_info.name}}<span class="am-form-group-label-tips">{{$data.home_footer_info.describe}}</span></label>
                        <textarea rows="6" name="{{$data.home_footer_info.only_tag}}" class="am-radius" placeholder="{{$data.home_footer_info.name}}" data-validation-message="{{$data.home_footer_info.error_tips}}">{{if !empty($data)}}{{$data.home_footer_info.value}}{{/if}}</textarea>
                    </div>
                </div>
            </div>

            <div class="am-form-popup-submit">
                <input type="hidden" name="nav_type" value="{{$nav_type}}" />
                <button type="submit" class="am-btn am-btn-primary am-radius am-btn-xs btn-loading-example" data-am-loading="{spinner: 'circle-o-notch', loadingText:'{{:MyLang('save_title')}}'}">
                    <i class="am-icon-save"></i>
                    <span>{{:MyLang('save_title')}}</span>
                </button>
            </div>
        </form>
        <!-- form end -->
	</div>
</div>
<!-- right content end  -->

<!-- footer start -->
{{:ModuleInclude('public/footer')}}